//
//  ThirdViewController.m
//  UI_Homework_09
//
//  Created by 黄威 on 16/5/13.
//  Copyright © 2016年 黄威. All rights reserved.
//

#import "ThirdViewController.h"
#import "DongtaiView.h"

@interface ThirdViewController ()

@end

@implementation ThirdViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self create];
}

-(instancetype)init{

    self = [super init];
    if (self) {
        [self create];
    }


    return self;

}

- (void)create{

    self.view.backgroundColor= [UIColor whiteColor];
self.tabBarItem = [[UITabBarItem alloc]initWithTitle:@"动态" image:[UIImage imageNamed:@"dongtai.png"] tag:2000];
    
    self.navigationItem.title = @"动态";
    
    
    
    
    

    UIImageView *image = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"beijing.png"]];
   
    image.frame = CGRectMake(0, 0, CGRectGetWidth(self.view.bounds), CGRectGetHeight(self.view.bounds));
    

    
    UIButton *dongtai = [UIButton buttonWithType:UIButtonTypeSystem];
    
    dongtai.frame = CGRectMake(10, 90, 100, 100);
    dongtai.showsTouchWhenHighlighted = YES;
    
    [self.view addSubview:image];
    [self.view addSubview:dongtai];
    

    
    UIButton *fujin = [UIButton buttonWithType:UIButtonTypeSystem];
    
    fujin.frame = CGRectMake(140, 90, 100, 100);
    fujin.showsTouchWhenHighlighted = YES;
    [self.view addSubview:fujin];
    
    UIButton *xingqubuluo = [UIButton buttonWithType:UIButtonTypeSystem];
    
    xingqubuluo.frame = CGRectMake(260, 90, 100, 100);
    xingqubuluo.showsTouchWhenHighlighted = YES;
    [self.view addSubview:xingqubuluo];

    
    [dongtai addTarget:self action:@selector(dongtaituichu) forControlEvents:UIControlEventTouchUpInside];
    
}

- (void)dongtaituichu{

    DongtaiView *Dongtai = [[DongtaiView alloc]init];

    [self.navigationController pushViewController:Dongtai animated:YES];



}


- (void)createphoto{}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
